Don't copy summary for collection-ref mirror subset pulls
authorMatthew Leeds <matthew.leeds@endlessm.com>
Thu, 14 Nov 2019 02:30:58 +0000 (18:30 -0800)
committerMatthew Leeds <matthew.leeds@endlessm.com>
Sat, 28 Mar 2020 17:35:19 +0000 (10:35 -0700)
commit164b2aa35bc2e39615f461decc90381d9bedd132
tree6be88335c26cb3797449ab6bb7bd1dc3580415b6
parentcd37293b5ad46b6158f46537b1535ae373e10cbe
Don't copy summary for collection-ref mirror subset pulls

When we're only pulling a subset of the refs available in the remote, it
doesn't make sense to copy the remote's summary (which may not be valid
for the local repo). This makes the check here match the one done
several lines above when we decide whether to error out if there's no
remote summary available.

This extends the fix in https://github.com/ostreedev/ostree/pull/935 for
the case of collection-refs.

Also, add a unit test for this issue, based on the existing one in
pull-test.sh.
src/libostree/ostree-repo-pull.c
tests/test-pull-collections.sh